package cn.com.hhrcw.es.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.common.es.Document;
import org.springframework.data.annotation.Id;

import java.util.Date;
import java.util.List;

/**
 * 招聘岗位信息
 *
 * @author lixingxing
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Document(index = "job", type = "position")
public class JobPositionDocument {

    @Id
    private String id;

    /**
     * 岗位名称
     */
    private String title;

    /**
     * 省
     */
    private String jobProvince;

    /**
     * 工作地点
     */
    @Dict(dicCode = "id",dicText = "name", dictTable = "sys_area")
    private String jobCity;

    /**
     * 区/县id
     */
    private String jobCounty;

    /**
     * 所属行业
     */
    @Dict(dicCode = "id",dicText = "name", dictTable = "sys_industry",multiple = true)
    private String jobIndustryId;

    /**
     * 所属职位
     */
    @Dict(dicCode = "id",dicText = "name", dictTable = "recruitment_position",multiple = true)
    private String jobTypeId;

    /**
     * 招聘类型 0 社招, 1 校招, 2 实习生招聘
     */
    @Dict(replace = {"0_社招","1_校招","2_实习生招聘"})
    private Integer recruitType;

    /**
     * 招聘人数
     */
    private Integer needCount;

    /**
     * 最低工作经验
     */
    private Integer minExperience;

    /**
     * 最高工作经验
     */
    private Integer maxExperience;

    /**
     * 学历要求 0 初中  1 高中 2 中专/中技 3 大专 4 本科 5 硕士 6 MBA/EMBA 7 博士
     */
    @Dict(replace = {"0_初中","1_高中","2_中专/中技","3_大专","4_本科","5_硕士","6_MBA/EMBA","7_博士"})
    private Integer eduLevel;

    /**
     * 公司性质
     */
    private String enNature;

    /**
     * 人员规模
     */
    @Dict(replace = {"0-20_20人以下","20-99_20-99人","100-299_100-299人","300-499_300-499人","500-999_500-999人","1000-9999_1000-9999人","10000-99999999_10000人以上"})
    private String enPersonnel;

    /**
     * 薪资下限 元
     */
    private Integer minMoney;

    /**
     * 薪资上限
     */
    private Integer maxMoney;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date publishTime;

    /**
     * 招聘公司id
     */
    private String companyId;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 企业logo
     */
    @Dict(dicCode = "id",dicText = "url", dictTable = "file")
    private String companyLogo;

    /**
     * 批次/专场标识 0 批次 1 专场
     */
    private Integer bsType;

    /**
     * 专场id
     */
    private String sessionId;

    /**
     * 专业要求
     */
    @Dict(dicCode = "item_value",dicText = "item_text",dictTable = "sys_dict_item",multiple = true)
    private String subject;

    private Integer recommendNo;

    /**
     * 公司福利
     */
    private List<String> companyBenefits;



    /**
     * 职位刷新时间
     */
    private Long refreshNo;

    /**
     * 渠道来源
     */
    private String channel;
}
